<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Structured programming</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Structured_programming"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Structured_programming rootpage-Structured_programming skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Structured programming</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><p><b>Structured programming</b> is a <a href="Programming_paradigm" title="Programming paradigm">programming paradigm</a> aimed at improving the clarity, quality, and development time of a <a href="Computer_program" title="Computer program">computer program</a> by making specific disciplined use of the structured <a href="Control_flow" title="Control flow">control flow</a> constructs of selection (<a href="Conditional_(computer_programming)" title="Conditional (computer programming)">if/then/else</a>) and repetition (<a href="While_loop" title="While loop">while</a> and <a href="For_loop" title="For loop">for</a>), <a href="Block_(programming)" title="Block (programming)">block structures</a>, and <a href="Subroutines" class="mw-redirect" title="Subroutines">subroutines</a>.
</p><p>It emerged in the late 1950s with the appearance of the <a href="ALGOL_58" title="ALGOL 58">ALGOL 58</a> and <a href="ALGOL_60" title="ALGOL 60">ALGOL 60</a> programming languages,<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> with the latter including support for block structures. Contributing factors to its popularity and widespread acceptance, at first in academia and later among practitioners, include the discovery of what is now known as the <a href="Structured_program_theorem" title="Structured program theorem">structured program theorem</a> in 1966,<sup id="cite_ref-FOOTNOTEBöhmJacopini1966_2-0" class="reference"><a href="#cite_note-FOOTNOTEBöhmJacopini1966-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> and the publication of the influential "<a href="Go_To_Statement_Considered_Harmful" class="mw-redirect" title="Go To Statement Considered Harmful">Go To Statement Considered Harmful</a>" open letter in 1968 by Dutch computer scientist <a href="Edsger_W._Dijkstra" title="Edsger W. Dijkstra">Edsger W. Dijkstra</a>, who coined the term "structured programming".<sup id="cite_ref-FOOTNOTEDijkstra1968147_3-0" class="reference"><a href="#cite_note-FOOTNOTEDijkstra1968147-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p><p>Structured programming is most frequently used with deviations that allow for clearer programs in some particular cases, such as when <a href="Exception_handling" title="Exception handling">exception handling</a> has to be performed.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Elements">Elements</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Control_structures">Control structures</h3></div>
<p>Following the <a href="Structured_program_theorem" title="Structured program theorem">structured program theorem</a>, all programs are seen as composed of three <a href="Control_structure" class="mw-redirect" title="Control structure">control structures</a>:
</p>
<ul><li>"Sequence"; ordered statements or subroutines executed in sequence.</li>
<li>"Selection"; one of a number of statements is executed depending on the state of the program. This is usually expressed with <a href="Keyword_(computer_programming)" class="mw-redirect" title="Keyword (computer programming)">keywords</a> such as <a href="Conditional_(programming)" class="mw-redirect" title="Conditional (programming)"><code>if..then..else..endif</code></a>. The conditional statement should have at least one true condition and each condition should have one exit point at max.</li>
<li>"Iteration"; a statement or block is executed until the program reaches a certain state, or operations have been applied to every element of a collection. This is usually expressed with keywords such as <a href="While_loop" title="While loop"><code>while</code></a>, <a href="Do_while_loop" title="Do while loop"><code>repeat</code></a>, <a href="For_loop" title="For loop"><code>for</code></a> or <a href="Do_while_loop" title="Do while loop"><code>do..until</code></a>. Often it is recommended that each loop should only have one entry point (and in the original structural programming, also only one exit point, and a few languages enforce this).</li></ul>
<div class="mw-heading mw-heading3"><h3 id="Subroutines">Subroutines</h3></div>
<p><a href="Subroutine" class="mw-redirect" title="Subroutine">Subroutines</a>; callable units such as procedures, functions, methods, or subprograms are used to allow a sequence to be referred to by a single statement.
</p>
<div class="mw-heading mw-heading3"><h3 id="Blocks">Blocks</h3></div>
<p><a href="Block_(programming)" title="Block (programming)">Blocks</a> are used to enable groups of statements to be treated as if they were one statement. <i>Block-structured</i> languages have a syntax for enclosing structures in some formal way, such as an if-statement bracketed by <code>if..fi</code> as in <a href="ALGOL_68" title="ALGOL 68">ALGOL 68</a>, or a code section bracketed by <code>BEGIN..END</code>, as in <a href="PL/I" title="PL/I">PL/I</a> and <a href="Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>, <a href="Whitespace_character" title="Whitespace character">whitespace</a> indentation as in <a href="Python_(programming_language)" title="Python (programming language)">Python</a>, or the curly braces <code>{...}</code> of <a href="C_(programming_language)" title="C (programming language)">C</a> and <a href="Curly_brace_family" class="mw-redirect" title="Curly brace family">many later languages</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Structured_programming_languages">Structured programming languages</h2></div>
<p>It is possible to do structured programming with any programming language enabling code blocks and the three types of control structures, even though a <a href="Procedural_programming_language" class="mw-redirect" title="Procedural programming language">procedural programming language</a> is able to break the structure.<sup id="cite_ref-:0_4-0" class="reference"><a href="#cite_note-:0-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> Some of the languages initially used for structured programming include: <a href="ALGOL" title="ALGOL">ALGOL</a>, <a href="Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>, <a href="PL/I" title="PL/I">PL/I</a>, <a href="Ada_(programming_language)" title="Ada (programming language)">Ada</a> and <a href="RPL_(programming_language)" title="RPL (programming language)">RPL</a> but most new procedural programming languages since that time have included features to encourage structured programming, and sometimes deliberately left out features – notably <a href="GOTO" class="mw-redirect" title="GOTO">GOTO</a> – in an effort to make <a href="Unstructured_programming" class="mw-redirect" title="Unstructured programming">unstructured programming</a> more difficult.
</p><p><i>Structured programming</i> (sometimes known as modular programming<sup id="cite_ref-:0_4-1" class="reference"><a href="#cite_note-:0-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>) enforces a logical structure on the program being written to make it more efficient and easier to understand and modify.
</p>
<div class="mw-heading mw-heading2"><h2 id="History">History</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Theoretical_foundation">Theoretical foundation</h3></div>
<p>The <a href="Structured_program_theorem" title="Structured program theorem">structured program theorem</a> provides the theoretical basis of structured programming. It states that three ways of combining programs—sequencing, selection, and iteration—are sufficient to express any <a href="Computable_function" title="Computable function">computable function</a>. This observation did not originate with the structured programming movement; these structures are sufficient to describe the <a href="Instruction_cycle" title="Instruction cycle">instruction cycle</a> of a <a href="Central_processing_unit" title="Central processing unit">central processing unit</a>, as well as the operation of a <a href="Turing_machine" title="Turing machine">Turing machine</a>. Therefore, a processor is always executing a "structured program" in this sense, even if the instructions it reads from memory are not part of a structured program. However, authors usually credit the result to a 1966 paper by Böhm and Jacopini, possibly because <a href="Edsger_W._Dijkstra" title="Edsger W. Dijkstra">Dijkstra</a> cited this paper himself.<sup id="cite_ref-FOOTNOTEDijkstra1968_6-0" class="reference"><a href="#cite_note-FOOTNOTEDijkstra1968-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> The structured program theorem does not address how to write and analyze a usefully structured program. These issues were addressed during the late 1960s and early 1970s, with major contributions by <a href="Edsger_W._Dijkstra" title="Edsger W. Dijkstra">Dijkstra</a>, <a href="Robert_W._Floyd" title="Robert W. Floyd">Robert W. Floyd</a>, <a href="Tony_Hoare" title="Tony Hoare">Tony Hoare</a>, <a href="Ole-Johan_Dahl" title="Ole-Johan Dahl">Ole-Johan Dahl</a>, and <a href="David_Gries" title="David Gries">David Gries</a>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Debate">Debate</h3></div>
<p><a href="P._J._Plauger" title="P. J. Plauger">P. J. Plauger</a>, an <a href="Early_adopter" title="Early adopter">early adopter</a> of structured programming, described his reaction to the structured program theorem:
</p>
<style data-mw-deduplicate="TemplateStyles:r1244412712">
/* start https://en.wikipedia.org/ */
.mw-parser-output .templatequote{overflow:hidden;margin:1em 0;padding:0 32px}.mw-parser-output .templatequotecite{line-height:1.5em;text-align:left;margin-top:0}@media(min-width:500px){.mw-parser-output .templatequotecite{padding-left:1.6em}}
/* end https://en.wikipedia.org/ */
</style><blockquote class="templatequote"><p>Us converts waved this interesting bit of news under the noses of the unreconstructed assembly-language programmers who kept trotting forth twisty bits of logic and saying, 'I betcha can't structure this.' Neither the proof by Böhm and Jacopini nor our repeated successes at writing structured code brought them around one day sooner than they were ready to convince themselves.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup></p></blockquote>
<p><a href="Donald_Knuth" title="Donald Knuth">Donald Knuth</a> accepted the principle that programs must be written with provability in mind, but he disagreed with abolishing the GOTO statement, and as of 2018 has continued to use it in his programs.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> In his 1974 paper, "Structured Programming with Goto Statements",<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> he gave examples where he believed that a direct jump leads to clearer and more efficient code without sacrificing provability. Knuth proposed a looser structural constraint: It should be possible to draw a program's <a href="Flow_chart" class="mw-redirect" title="Flow chart">flow chart</a> with all forward branches on the left, all backward branches on the right, and no branches crossing each other. Many of those knowledgeable in <a href="Compiler" title="Compiler">compilers</a> and <a href="Graph_theory" title="Graph theory">graph theory</a> have advocated allowing only <a href="Reducible_flow_graphs" class="mw-redirect" title="Reducible flow graphs">reducible flow graphs</a>.
</p><p>Structured programming theorists gained a major ally in the 1970s after <a href="IBM" title="IBM">IBM</a> researcher <a href="Harlan_Mills" title="Harlan Mills">Harlan Mills</a> applied his interpretation of structured programming theory to the development of an indexing system for <i><a href="The_New_York_Times" title="The New York Times">The New York Times</a></i> research file. The project was a great engineering success, and managers at other companies cited it in support of adopting structured programming, although Dijkstra criticized the ways that Mills's interpretation differed from the published work.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>
</p><p>As late as 1987 it was still possible to raise the question of structured programming in a computer science journal. Frank Rubin did so in that year with an open letter titled "'GOTO Considered Harmful' Considered Harmful".<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> Numerous objections followed, including a response from Dijkstra that sharply criticized both Rubin and the concessions other writers made when responding to him.
</p>
<div class="mw-heading mw-heading3"><h3 id="Outcome">Outcome</h3></div>
<p>By the end of the 20th century, nearly all computer scientists were convinced that it is useful to learn and apply the concepts of structured programming. High-level programming languages that originally lacked programming structures, such as <a href="FORTRAN" class="mw-redirect" title="FORTRAN">FORTRAN</a>, <a href="COBOL" title="COBOL">COBOL</a>, and <a href="BASIC" title="BASIC">BASIC</a>, now have them.
</p>
<div class="mw-heading mw-heading2"><h2 id="Common_deviations">Common deviations</h2></div>
<p>While goto has now largely been replaced by the structured constructs of selection (if/then/else) and repetition (while and for), few languages are purely structured. The most common deviation, found in many languages, is the use of a <a href="Return_statement" title="Return statement">return statement</a> for early exit from a subroutine. This results in multiple exit points, instead of the single exit point required by structured programming. There are other constructions to handle cases that are awkward in purely structured programming.
</p>
<div class="mw-heading mw-heading3"><h3 id="Early_exit">Early exit</h3></div>
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Further information: <a href="Return_early" class="mw-redirect" title="Return early">Return early</a></div>
<p>The most common deviation from structured programming is <b>early exit</b> from a function or loop. At the level of functions, this is a <code>return</code> statement. At the level of loops, this is a <code>break</code> statement (terminate the loop) or <code>continue</code> statement (terminate the current iteration, proceed with next iteration). In structured programming, these can be replicated by adding additional branches or tests, but for returns from nested code this can add significant complexity. <a href="C_(programming_language)" title="C (programming language)">C</a> is an early and prominent example of these constructs. Some newer languages also have "labeled breaks", which allow breaking out of more than just the innermost loop. Exceptions also allow early exit, but have further consequences, and thus are treated below.
</p><p>Multiple exits can arise for a variety of reasons, most often either that the subroutine has no more work to do (if returning a value, it has completed the calculation), or has encountered "exceptional" circumstances that prevent it from continuing, hence needing exception handling.
</p><p>The most common problem in early exit is that cleanup or final statements are not executed – for example, allocated memory is not deallocated, or open files are not closed, causing <a href="Memory_leak" title="Memory leak">memory leaks</a> or <a href="Resource_leak" title="Resource leak">resource leaks</a>. These must be done at each return site, which is brittle and can easily result in bugs. For instance, in later development, a return statement could be overlooked by a developer, and an action that should be performed at the end of a subroutine (e.g., a <a href="Tracing_(software)" title="Tracing (software)">trace</a> statement) might not be performed in all cases. Languages without a return statement, such as standard <a href="Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a> and <a href="Seed7" title="Seed7">Seed7</a>, do not have this problem.
</p><p>Most modern languages provide language-level support to prevent such leaks;<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> see detailed discussion at <a href="Resource_management_(computing)" title="Resource management (computing)">resource management</a>. Most commonly this is done via unwind protection, which ensures that certain code is guaranteed to be run when execution exits a block; this is a structured alternative to having a cleanup block and a <code>goto</code>. This is most often known as <code>try...finally,</code> and considered a part of <a href="Exception_handling" title="Exception handling">exception handling</a>. In case of multiple <code>return</code> statements introducing <code>try...finally,</code> without exceptions might look strange. Various techniques exist to encapsulate resource management. An alternative approach, found primarily in C++, is <a href="Resource_Acquisition_Is_Initialization" class="mw-redirect" title="Resource Acquisition Is Initialization">Resource Acquisition Is Initialization</a>, which uses normal stack unwinding (variable deallocation) at function exit to call destructors on local variables to deallocate resources.
</p><p><a href="Kent_Beck" title="Kent Beck">Kent Beck</a>, <a href="Martin_Fowler_(software_engineer)" title="Martin Fowler (software engineer)">Martin Fowler</a> and co-authors have argued in their <a href="Refactoring" class="mw-redirect" title="Refactoring">refactoring</a> books that nested conditionals may be harder to understand than a certain type of flatter structure using multiple exits predicated by <a href="Guard_clause" class="mw-redirect" title="Guard clause">guard clauses</a>. Their 2009 book flatly states that "one exit point is really not a useful rule. Clarity is the key principle: If the method is clearer with one exit point, use one exit point; otherwise don’t". They offer a cookbook solution for transforming a function consisting only of nested conditionals into a sequence of guarded return (or throw) statements, followed by a single unguarded block, which is intended to contain the code for the common case, while the guarded statements are supposed to deal with the less common ones (or with errors).<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> <a href="Herb_Sutter" title="Herb Sutter">Herb Sutter</a> and <a href="Andrei_Alexandrescu" title="Andrei Alexandrescu">Andrei Alexandrescu</a> also argue in their 2004 C++ tips book that the single-exit point is an obsolete requirement.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup>
</p><p>In his 2004 textbook, <a href="David_Watt_(computer_scientist)" title="David Watt (computer scientist)">David Watt</a> writes that "single-entry multi-exit control flows are often desirable". Using Tennent's framework notion of <a href="S-algol" title="S-algol">sequencer</a>, Watt uniformly describes the control flow constructs found in contemporary programming languages and attempts to explain why certain types of sequencers are preferable to others in the context of multi-exit control flows. Watt writes that unrestricted gotos (jump sequencers) are bad because the destination of the jump is not self-explanatory to the reader of a program until the reader finds and examines the actual label or address that is the target of the jump. In contrast, Watt argues that the conceptual intent of a return sequencer is clear from its own context, without having to examine its destination. Watt writes that a class of sequencers known as <i>escape sequencers</i>, defined as a "sequencer that terminates execution of a textually enclosing command or procedure", encompasses both breaks from loops (including multi-level breaks) and return statements. Watt also notes that while jump sequencers (gotos) have been somewhat restricted in languages like C, where the target must be an inside the local block or an encompassing outer block, that restriction alone is not sufficient to make the intent of gotos in C self-describing and so they can still produce "<a href="Spaghetti_code" title="Spaghetti code">spaghetti code</a>". Watt also examines how exception sequencers differ from escape and jump sequencers; this is explained in the next section of this article.<sup id="cite_ref-FOOTNOTEWattFindlay2004215–221_15-0" class="reference"><a href="#cite_note-FOOTNOTEWattFindlay2004215–221-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup>
</p><p>In contrast to the above, <a href="Bertrand_Meyer" title="Bertrand Meyer">Bertrand Meyer</a> wrote in his 2009 textbook that instructions like <code>break</code> and <code>continue</code> "are just the old <code>goto</code> in sheep's clothing" and strongly advised against their use.<sup id="cite_ref-Meyer2009_16-0" class="reference"><a href="#cite_note-Meyer2009-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Exception_handling">Exception handling</h3></div>
<div role="note" class="hatnote navigation-not-searchable">Further information: <a href="Exception_handling_(programming)" title="Exception handling (programming)">Exception handling (programming)</a></div>
<p>Based on the coding error from the <a href="Cluster_(spacecraft)" class="mw-redirect" title="Cluster (spacecraft)">Ariane 501 disaster</a>, software developer Jim Bonang argues that any exceptions thrown from a function violate the single-exit paradigm, and proposes that all inter-procedural exceptions should be forbidden. Bonang proposes that all single-exit conforming C++ should be written along the lines of:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="kt">bool</span><span class="w"> </span><span class="nf">MyCheck1</span><span class="p">()</span><span class="w"> </span><span class="k">throw</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kt">bool</span><span class="w"> </span><span class="n">success</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">false</span><span class="p">;</span>
<span class="w"> </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="c1">// Do something that may throw exceptions.</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">MyCheck2</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">throw</span><span class="w"> </span><span class="n">SomeInternalException</span><span class="p">();</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="c1">// Other code similar to the above.</span>
<span class="w"> </span><span class="n">success</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(...)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="c1">// All exceptions caught and logged.</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">success</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>Peter Ritchie also notes that, in principle, even a single <code>throw</code> right before the <code>return</code> in a function constitutes a violation of the single-exit principle, but argues that Dijkstra's rules were written in a time before exception handling became a paradigm in programming languages, so he proposes to allow any number of throw points in addition to a single return point. He notes that solutions that wrap exceptions for the sake of creating a single-exit have higher nesting depth and thus are more difficult to comprehend, and even accuses those who propose to apply such solutions to programming languages that support exceptions of engaging in <a href="Cargo_cult_programming" title="Cargo cult programming">cargo cult</a> thinking.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup>
</p><p>David Watt also analyzes exception handling in the framework of sequencers (introduced in this article in <a class="mw-selflink-fragment" href="#Early_exit">the previous section on early exits</a>.) Watt notes that an abnormal situation (generally exemplified with arithmetic overflows or input/output failures like file not found) is a kind of error that "is detected in some low-level program unit, but [for which] a handler is more naturally located in a high-level program unit". For example, a program might contain several calls to read files, but the action to perform when a file is not found depends on the meaning (purpose) of the file in question to the program and thus a handling routine for this abnormal situation cannot be located in low-level system code. Watts further notes that introducing status flags testing in the caller, as single-exit structured programming or even (multi-exit) return sequencers would entail, results in a situation where "the application code tends to get cluttered by tests of status flags" and that "the programmer might forgetfully or lazily omit to test a status flag. In fact, abnormal situations represented by status flags are by default ignored!" He notes that in contrast to status flags testing, exceptions have the opposite <a href="Default_(computer_science)" title="Default (computer science)">default behavior</a>, causing the program to terminate unless the programmer explicitly deals with the exception in some way, possibly by adding code to willfully ignore it. Based on these arguments, Watt concludes that jump sequencers or escape sequencers (discussed in the previous section) are not as suitable as a dedicated exception sequencer with the semantics discussed above.<sup id="cite_ref-FOOTNOTEWattFindlay2004221–222_18-0" class="reference"><a href="#cite_note-FOOTNOTEWattFindlay2004221–222-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup>
</p><p>The textbook by Louden and Lambert emphasizes that exception handling differs from structured programming constructs like <code>while</code> loops because the transfer of control "is set up at a different point in the program than that where the actual transfer takes place. At the point where the transfer actually occurs, there may be no syntactic indication that control will in fact be transferred."<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> Computer science professor Arvind Kumar Bansal also notes that in languages which implement exception handling, even control structures like <code>for</code>, which have the single-exit property in absence of exceptions, no longer have it in presence of exceptions, because an exception can prematurely cause an early exit in any part of the control structure; for instance if <code>init()</code> throws an exception in <code>for (init(); check(); increm())</code>, then the usual exit point after check() is not reached.<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> Citing multiple prior studies by others (1999–2004) and their own results, Westley Weimer and <a href="George_Necula" title="George Necula">George Necula</a> wrote that a significant problem with exceptions is that they "create hidden control-flow paths that are difficult for programmers to reason about".<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup>
</p><p>The necessity to limit code to single-exit points appears in some contemporary programming environments focused on <a href="Parallel_computing" title="Parallel computing">parallel computing</a>, such as <a href="OpenMP" title="OpenMP">OpenMP</a>. The various parallel constructs from OpenMP, like <code>parallel do</code>, do not allow early exits from inside to the outside of the parallel construct; this restriction includes all manner of exits, from <code>break</code> to C++ exceptions, but all of these are permitted inside the parallel construct if the jump target is also inside it.<sup id="cite_ref-Chandra2001_22-0" class="reference"><a href="#cite_note-Chandra2001-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Multiple_entry">Multiple entry</h3></div>
<div role="note" class="hatnote navigation-not-searchable">Further information: <a href="Coroutine" title="Coroutine">Coroutine</a></div>
<p>More rarely, subprograms allow multiple <i>entry.</i> This is most commonly only <i>re</i>-entry into a <a href="Coroutine" title="Coroutine">coroutine</a> (or <a href="Generator_(computer_programming)" title="Generator (computer programming)">generator</a>/semicoroutine), where a subprogram yields control (and possibly a value), but can then be resumed where it left off. There are a number of <a href="Coroutine#Common_uses" title="Coroutine">common uses</a> of such programming, notably for <a href="Stream_(computing)" title="Stream (computing)">streams</a> (particularly input/output), state machines, and concurrency. From a code execution point of view, yielding from a coroutine is closer to structured programming than returning from a subroutine, as the subprogram has not actually terminated, and will continue when called again – it is not an early exit. However, coroutines mean that multiple subprograms have execution state – rather than a single call stack of subroutines – and thus introduce a different form of complexity.
</p><p>It is very rare for subprograms to allow entry to an arbitrary position in the subprogram, as in this case the program state (such as variable values) is uninitialized or ambiguous, and this is very similar to a goto.
</p>
<div class="mw-heading mw-heading3"><h3 id="State_machines">State machines</h3></div>
<p>Some programs, particularly <a href="Parsers" class="mw-redirect" title="Parsers">parsers</a> and <a href="Communications_protocol" class="mw-redirect" title="Communications protocol">communications protocols</a>, have a number of <a href="State_(computer_science)" title="State (computer science)">states</a> that follow each other in a way that is not easily reduced to the basic structures, and some programmers implement the state-changes with a jump to the new state. This type of state-switching is often used in the Linux kernel.
</p><p>However, it is possible to structure these systems by making each state-change a separate subprogram and using a variable to indicate the active state (see <a href="Trampoline_(computing)" title="Trampoline (computing)">trampoline</a>). Alternatively, these can be implemented via coroutines, which dispense with the trampoline.
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="DRAKON" title="DRAKON">DRAKON</a></li>
<li><a href="Minimal_evaluation" class="mw-redirect" title="Minimal evaluation">Minimal evaluation</a></li>
<li><a href="Nassi%E2%80%93Shneiderman_diagram" title="Nassi–Shneiderman diagram">Nassi–Shneiderman diagram</a></li>
<li><a href="Structure_chart" title="Structure chart">Structure chart</a></li>
<li><a href="Structured_concurrency" title="Structured concurrency">Structured concurrency</a></li>
<li><a href="Switch_statement" title="Switch statement">Switch statement</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Citations">Citations</h3></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFClarkRobert2000" class="citation book cs1">Clark, Leslie B. Wilson, Robert G.; Robert, Clark (2000). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=bVSjoO8f2fMC&q=Comparative+Programming+Languages&pg=PA20"><i>Comparative programming languages</i></a> (3rd ed.). Harlow, England: Addison-Wesley. p. 20. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>9780201710120</bdi>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20151126050203/https://books.google.co.uk/books?id=bVSjoO8f2fMC&lpg=PR11&ots=zItCa2GxG6&dq=Comparative%20Programming%20Languages&lr&pg=PA20#v=onepage&q=Comparative%20Programming%20Languages&f=false">Archived</a> from the original on 26 November 2015<span class="reference-accessdate">. Retrieved <span class="nowrap">25 November</span> 2015</span>.</cite><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite book}}</code>: CS1 maint: multiple names: authors list (link)</span></span>
</li>
<li id="cite_note-FOOTNOTEBöhmJacopini1966-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBöhmJacopini1966_2-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBöhmJacopini1966">Böhm & Jacopini 1966</a>.</span>
</li>
<li id="cite_note-FOOTNOTEDijkstra1968147-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEDijkstra1968147_3-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFDijkstra1968">Dijkstra 1968</a>, p. 147, "The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. ... The go to statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program."</span>
</li>
<li id="cite_note-:0-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-:0_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:0_4-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.techtarget.com/searchsoftwarequality/definition/structured-programming-modular-programming">"What is Structured Programming?"</a>. <i>Software Quality</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2024-04-09</span></span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://courses.lumenlearning.com/sanjacinto-computerapps/chapter/reading-structured-programming/">"Reading: Structured Programming | ITE 115 Introduction to Computer Applications and Concepts"</a>. <i>courses.lumenlearning.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2024-04-09</span></span>.</cite></span>
</li>
<li id="cite_note-FOOTNOTEDijkstra1968-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEDijkstra1968_6-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFDijkstra1968">Dijkstra 1968</a>.</span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite id="CITEREFPlauger1993" class="citation book cs1"><a href="P._J._Plauger" title="P. J. Plauger">Plauger, P. J.</a> (February 12, 1993). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/programmingonpur0000plau"><i>Programming on Purpose, Essays on Software Design</i></a></span> (1st ed.). Prentice-Hall. p. <a rel="nofollow" class="external text" href="https://archive.org/details/programmingonpur0000plau/page/25">25</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-13-721374-0</bdi>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite class="citation audio-visual cs1"><a rel="nofollow" class="external text" href="https://www.youtube.com/watch?t=2610&v=XWR5Y3Wf8Fo"><i>DLS • Donald Knuth • All Questions Answered</i></a>. <i>YouTube</i>. University of Waterloo. 15 Nov 2018. 48 minutes in<span class="reference-accessdate">. Retrieved <span class="nowrap">24 July</span> 2022</span>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite id="CITEREFDonald_E._Knuth1974" class="citation journal cs1">Donald E. Knuth (December 1974). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20131023061601/http://cs.sjsu.edu/~mak/CS185C/KnuthStructuredProgrammingGoTo.pdf">"Structured programming with go to statements"</a> <span class="cs1-format">(PDF)</span>. <i>Computing Surveys</i>. <b>6</b> (4): <span class="nowrap">261–</span>301. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F356635.356640">10.1145/356635.356640</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:207630080">207630080</a>. Archived from <a rel="nofollow" class="external text" href="http://cs.sjsu.edu/~mak/CS185C/KnuthStructuredProgrammingGoTo.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2013-10-23.</cite></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"> In EWD1308, <cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.cs.utexas.edu/users/EWD/transcriptions/EWD13xx/EWD1308.html">"What led to "Notes on Structured Programming""</a>.</cite>, dated 10 June 2001, Dijkstra writes, "Apparently, IBM did not like the popularity of my text; it stole the term "Structured Programming" and under its auspices Harlan D. Mills trivialized the original concept to the abolishment of the goto statement."</span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite id="CITEREFFrank_Rubin1987" class="citation journal cs1">Frank Rubin (March 1987). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20090320002214/http://www.ecn.purdue.edu/ParaMount/papers/rubin87goto.pdf">""GOTO Considered Harmful" Considered Harmful"</a> <span class="cs1-format">(PDF)</span>. <i>Communications of the ACM</i>. <b>30</b> (3): <span class="nowrap">195–</span>196. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F214748.315722">10.1145/214748.315722</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:6853038">6853038</a>. Archived from <a rel="nofollow" class="external text" href="http://www.ecn.purdue.edu/ParaMount/papers/rubin87goto.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2009-03-20.</cite></span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><cite id="CITEREFElderJacksonLiblit2008" class="citation techreport cs1">Elder, Matt; Jackson, Steve; Liblit, Ben (October 2008). <a rel="nofollow" class="external text" href="http://research.cs.wisc.edu/techreports/2008/TR1647.pdf"><i>Code Sandwiches</i></a> <span class="cs1-format">(PDF)</span> (Technical report). <a href="University_of_Wisconsin%E2%80%93Madison" title="University of Wisconsin–Madison">University of Wisconsin–Madison</a>. 1647.</cite></span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite id="CITEREFJay_FieldsShane_HarvieMartin_FowlerKent_Beck2009" class="citation book cs1">Jay Fields; Shane Harvie; Martin Fowler; Kent Beck (2009). <i>Refactoring: Ruby Edition</i>. Pearson Education. pp. <span class="nowrap">274–</span>279. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-321-60350-0</bdi>.</cite></span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><cite id="CITEREFHerb_SutterAndrei_Alexandrescu2004" class="citation book cs1">Herb Sutter; Andrei Alexandrescu (2004). <i>C++ Coding Standards: 101 Rules, Guidelines, and Best Practices</i>. Pearson Education. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-13-265442-5</bdi>. <q>Example 4: Single entry, single exit ("SESE"). Historically, some coding standards have required that each function have exactly one exit, meaning one return statement. Such a requirement is obsolete in languages that support exceptions and destructors, where functions typically have numerous implicit exits.</q></cite></span>
</li>
<li id="cite_note-FOOTNOTEWattFindlay2004215–221-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEWattFindlay2004215–221_15-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFWattFindlay2004">Watt & Findlay 2004</a>, pp. 215–221.</span>
</li>
<li id="cite_note-Meyer2009-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-Meyer2009_16-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBertrand_Meyer2009" class="citation book cs1">Bertrand Meyer (2009). <i>Touch of Class: Learning to Program Well with Objects and Contracts</i>. Springer Science & Business Media. p. 189. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-3-540-92144-8</bdi>.</cite></span>
</li>
<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msmvps.com/blogs/peterritchie/archive/2008/03/07/single-entry-single-exit-should-it-still-be-applicable-in-object-oriented-languages.aspx">"Single-Entry, Single-Exit, Should It Still be Applicable in Object-oriented Languages?"</a>. <i>Peter Ritchie's MVP Blog</i>. 7 March 2008. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20121114195652/http://msmvps.com/blogs/peterritchie/archive/2008/03/07/single-entry-single-exit-should-it-still-be-applicable-in-object-oriented-languages.aspx">Archived</a> from the original on 2012-11-14<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-07-15</span></span>.</cite></span>
</li>
<li id="cite_note-FOOTNOTEWattFindlay2004221–222-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEWattFindlay2004221–222_18-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFWattFindlay2004">Watt & Findlay 2004</a>, pp. 221–222.</span>
</li>
<li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><cite id="CITEREFKenneth_C._LoudenKenneth_A._Lambert2011" class="citation book cs1">Kenneth C. Louden; Kenneth A. Lambert (2011). <i>Programming Languages: Principles and Practices</i> (3rd ed.). Cengage Learning. p. 423. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-111-52941-3</bdi>.</cite></span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><cite id="CITEREFArvind_Kumar_Bansal2013" class="citation book cs1">Arvind Kumar Bansal (2013). <i>Introduction to Programming Languages</i>. CRC Press. p. 135. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-4665-6514-2</bdi>.</cite></span>
</li>
<li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><cite id="CITEREFWeimer,_W.Necula,_G.C.2008" class="citation journal cs1">Weimer, W. & Necula, G.C. (2008). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150923211739/http://www.cs.virginia.edu/~weimer/p/weimer-toplas2008.pdf">"Exceptional Situations and Program Reliability"</a> <span class="cs1-format">(PDF)</span>. <i>ACM Transactions on Programming Languages and Systems</i>. <b>30</b> (2). 8:27. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F1330017.1330019">10.1145/1330017.1330019</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:3136431">3136431</a>. Archived from <a rel="nofollow" class="external text" href="http://www.cs.virginia.edu/~weimer/p/weimer-toplas2008.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2015-09-23.</cite></span>
</li>
<li id="cite_note-Chandra2001-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-Chandra2001_22-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFRohit_Chandra2001" class="citation book cs1">Rohit Chandra (2001). <i>Parallel Programming in OpenMP</i>. Morgan Kaufmann. p. 45. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-55860-671-5</bdi>.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading3"><h3 id="Sources">Sources</h3></div>
<style data-mw-deduplicate="TemplateStyles:r1239549316">
/* start https://en.wikipedia.org/ */
.mw-parser-output .refbegin{margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li{margin-left:0;padding-left:3.2em;text-indent:-3.2em}.mw-parser-output .refbegin-hanging-indents ul,.mw-parser-output .refbegin-hanging-indents ul li{list-style:none}@media(max-width:720px){.mw-parser-output .refbegin-hanging-indents>ul>li{padding-left:1.6em;text-indent:-1.6em}}.mw-parser-output .refbegin-columns{margin-top:0.3em}.mw-parser-output .refbegin-columns ul{margin-top:0}.mw-parser-output .refbegin-columns li{page-break-inside:avoid;break-inside:avoid-column}@media screen{.mw-parser-output .refbegin{font-size:90%}}
/* end https://en.wikipedia.org/ */
</style><div class="refbegin" style="">
<ul><li><a href="Edsger_Dijkstra" class="mw-redirect" title="Edsger Dijkstra">Edsger Dijkstra</a>, <a rel="nofollow" class="external text" href="http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD249.PDF"><i>Notes on Structured Programming</i></a>, p. 6.</li>
<li><cite id="CITEREFBöhmJacopini1966" class="citation journal cs1"><a href="Corrado_B%C3%B6hm" title="Corrado Böhm">Böhm, Corrado</a>; Jacopini, Giuseppe (May 1966). <a rel="nofollow" class="external text" href="http://www.cs.unibo.it/~martini/PP/bohm-jac.pdf">"Flow Diagrams, Turing Machines and Languages with Only Two Formation Rules"</a> <span class="cs1-format">(PDF)</span>. <i><a href="Communications_of_the_ACM" title="Communications of the ACM">Communications of the ACM</a></i>. <b>9</b> (5): <span class="nowrap">366–</span>371. <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.119.9119">10.1.1.119.9119</a></span>. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F355592.365646">10.1145/355592.365646</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:10236439">10236439</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20150923211431/http://www.cs.unibo.it/~martini/PP/bohm-jac.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2015-09-23.</cite></li>
<li><cite id="CITEREFDijkstra1968" class="citation journal cs1"><a href="Edsger_Dijkstra" class="mw-redirect" title="Edsger Dijkstra">Dijkstra, Edsger W.</a> (March 1968). <a rel="nofollow" class="external text" href="https://www.cs.utexas.edu/users/EWD/ewd02xx/EWD215.PDF">"Letters to the editor: Go to statement considered harmful"</a> <span class="cs1-format">(PDF)</span>. <i><a href="Communications_of_the_ACM" title="Communications of the ACM">Communications of the ACM</a></i>. <b>11</b> (3): <span class="nowrap">147–</span>148. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F362929.362947">10.1145/362929.362947</a>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a> <a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/0001-0782">0001-0782</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:17469809">17469809</a>.</cite></li>
<li><a href="Michael_A._Jackson_(computer_scientist)" title="Michael A. Jackson (computer scientist)">Michael A. Jackson</a>, <i>Principles of Program Design</i>, Academic Press, London, 1975.</li>
<li><a href="Ole-Johan_Dahl" title="Ole-Johan Dahl">O.-J. Dahl</a>, <a href="E._W._Dijkstra" class="mw-redirect" title="E. W. Dijkstra">E. W. Dijkstra</a>, <a href="C._A._R._Hoare" class="mw-redirect" title="C. A. R. Hoare">C. A. R. Hoare</a> <i>Structured Programming</i>, Academic Press, London, 1972. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>0-12-200550-3</bdi>.
<ul><li>this volume includes an expanded version of the <i>Notes on Structured Programming</i>, above, including an extended example of using the structured approach to develop a backtracking algorithm to solve the <a href="Eight_queens_puzzle" title="Eight queens puzzle">8 Queens problem</a>.</li>
<li><a rel="nofollow" class="external text" href="http://portal.acm.org/citation.cfm?id=1243380&jmp=cit&coll=portal&dl=GUIDE&CFID=://www.acm.org/publications/&CFTOKEN=www.acm.org/publications/#CIT">a pdf version is in the ACM Classic Books Series</a></li>
<li>Note that the third chapter of this book, by Dahl, describes an approach that is easily recognized as Object Oriented Programming. It can be seen as another way to "usefully structure" a program to aid in showing that it is correct.</li></ul></li>
<li><cite id="CITEREFWattFindlay2004" class="citation book cs1">Watt, David Anthony; Findlay, William (2004). <i>Programming language design concepts</i>. John Wiley & Sons. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-470-85320-7</bdi>.</cite></li></ul>
</div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1290876196">
/* start https://en.wikipedia.org/ */
.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .infobox .side-box{font-size:100%}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1237033735">
/* start https://en.wikipedia.org/ */
@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}
/* end https://en.wikipedia.org/ */
</style><div class="side-box side-box-right sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */
.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}
/* end https://en.wikipedia.org/ */
</style>
<div class="side-box-flex">
<div class="side-box-image"><span class="noviewer" typeof="mw:File"></span></div>
<div class="side-box-text plainlist">The Wikibook <i><a href="https://en.wikibooks.org/wiki/Computer_Programming" class="extiw external" title="wikibooks:Computer Programming">Computer Programming</a></i> has a page on the topic of: <i><b><a href="https://en.wikibooks.org/wiki/Computer_Programming/Control" class="extiw external" title="wikibooks:Computer Programming/Control">Control</a></b></i></div></div>
</div>
<ul><li><a rel="nofollow" class="external text" href="https://code.google.com/p/bpstruct/">BPStruct</a> - A tool to structure concurrent systems (programs, process models)</li>
<li><cite id="CITEREFJ._DarlintonM._GhanemH._W._To1993" class="citation cs2">J. Darlinton; M. Ghanem; H. W. To (1993), "Structured Parallel Programming", <i>In Programming Models for Massively Parallel Computers. IEEE Computer Society Press. 1993</i>: <span class="nowrap">160–</span>169, <a href="CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.4610">10.1.1.37.4610</a></span></cite></li></ul>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Programming_paradigms_(Comparison_by_language)368" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div id="Programming_paradigms_(Comparison_by_language)368" style="font-size:114%;margin:0 4em"><a href="Programming_paradigm" title="Programming paradigm">Programming paradigms</a> (<a href="Comparison_of_multi-paradigm_programming_languages" title="Comparison of multi-paradigm programming languages">Comparison by language</a>)</div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Imperative_programming" title="Imperative programming">Imperative</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Jackson_structured_programming" title="Jackson structured programming">Jackson structures</a></li>
<li><a href="Block_(programming)" title="Block (programming)">Block-structured</a></li>
<li><a href="Modular_programming" title="Modular programming">Modular</a></li>
<li><a href="Non-structured_programming" title="Non-structured programming">Non-structured</a></li>
<li><a href="Procedural_programming" title="Procedural programming">Procedural</a></li>
<li><a href="Programming_in_the_large_and_programming_in_the_small" title="Programming in the large and programming in the small">Programming in the large and in the small</a></li>
<li><a href="Design_by_contract" title="Design by contract">Design by contract</a></li>
<li><a href="Invariant-based_programming" title="Invariant-based programming">Invariant-based</a></li>
<li><a href="Nested_function" title="Nested function">Nested function</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Object-oriented_programming" title="Object-oriented programming">Object-oriented</a><br>(<a href="Comparison_of_programming_languages_(object-oriented_programming)" title="Comparison of programming languages (object-oriented programming)">comparison</a>, <a href="List_of_object-oriented_programming_languages" title="List of object-oriented programming languages">list</a>)</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Class-based_programming" title="Class-based programming">Class-based</a>, <a href="Prototype-based_programming" title="Prototype-based programming">Prototype-based</a>, <a href="Object-based_language" title="Object-based language">Object-based</a></li>
<li><a href="Agent-oriented_programming" title="Agent-oriented programming">Agent</a></li>
<li><a href="Immutable_object" title="Immutable object">Immutable object</a></li>
<li><a href="Persistent_programming_language" title="Persistent programming language">Persistent</a></li>
<li><a href="Uniform_function_call_syntax" title="Uniform function call syntax">Uniform function call syntax</a></li></ul>
</div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Declarative_programming" title="Declarative programming">Declarative</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Functional_programming" title="Functional programming">Functional</a><br>(<a href="Comparison_of_functional_programming_languages" title="Comparison of functional programming languages">comparison</a>)</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Recursion_(computer_science)" title="Recursion (computer science)">Recursive</a></li>
<li><a href="Anonymous_function" title="Anonymous function">Anonymous function</a> (<a href="Partial_application" title="Partial application">Partial application</a>)</li>
<li><a href="Higher-order_programming" title="Higher-order programming">Higher-order</a></li>
<li><a href="Purely_functional_programming" title="Purely functional programming">Purely functional</a></li>
<li><a href="Total_functional_programming" title="Total functional programming">Total</a></li>
<li><a href="Strict_programming_language" title="Strict programming language">Strict</a></li>
<li><a href="Generalized_algebraic_data_type" title="Generalized algebraic data type">GADTs</a></li>
<li><a href="Dependent_type" title="Dependent type">Dependent types</a></li>
<li><a href="Functional_logic_programming" title="Functional logic programming">Functional logic</a></li>
<li><a href="Tacit_programming" title="Tacit programming">Point-free style</a></li>
<li><a href="Expression-oriented_programming_language" title="Expression-oriented programming language">Expression-oriented</a></li>
<li><a href="Applicative_programming_language" title="Applicative programming language">Applicative</a>, <a href="Concatenative_programming_language" title="Concatenative programming language">Concatenative</a></li>
<li><a href="Function-level_programming" title="Function-level programming">Function-level</a>, <a href="Value-level_programming" title="Value-level programming">Value-level</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Dataflow_programming" title="Dataflow programming">Dataflow</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Flow-based_programming" title="Flow-based programming">Flow-based</a></li>
<li><a href="Reactive_programming" title="Reactive programming">Reactive</a> (<a href="Functional_reactive_programming" title="Functional reactive programming">Functional reactive</a>)</li>
<li><a href="Signal_programming" class="mw-redirect" title="Signal programming">Signals</a></li>
<li><a href="Stream_processing" title="Stream processing">Streams</a></li>
<li><a href="Synchronous_programming_language" title="Synchronous programming language">Synchronous</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Logic_programming" title="Logic programming">Logic</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Abductive_logic_programming" title="Abductive logic programming">Abductive logic</a></li>
<li><a href="Answer_set_programming" title="Answer set programming">Answer set</a></li>
<li><a href="Constraint_programming" title="Constraint programming">Constraint</a> (<a href="Constraint_logic_programming" title="Constraint logic programming">Constraint logic</a>)</li>
<li><a href="Inductive_logic_programming" title="Inductive logic programming">Inductive logic</a></li>
<li><a href="Nondeterministic_programming" title="Nondeterministic programming">Nondeterministic</a></li>
<li><a href="Ontology_language" title="Ontology language">Ontology</a></li>
<li><a href="Probabilistic_logic_programming" title="Probabilistic logic programming">Probabilistic logic</a></li>
<li><a href="Query_language" title="Query language">Query</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Domain-specific_language" title="Domain-specific language">DSL</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Algebraic_modeling_language" title="Algebraic modeling language">Algebraic modeling</a></li>
<li><a href="Array_programming" title="Array programming">Array</a></li>
<li><a href="Automata-based_programming" title="Automata-based programming">Automata-based</a> (<a href="Action_language" title="Action language">Action</a>)</li>
<li><a href="Command_language" title="Command language">Command</a> (<a href="Spacecraft_command_language" title="Spacecraft command language">Spacecraft</a>)</li>
<li><a href="Differentiable_programming" title="Differentiable programming">Differentiable</a></li>
<li><a href="End-user_development" title="End-user development">End-user</a></li>
<li><a href="Grammar-oriented_programming" title="Grammar-oriented programming">Grammar-oriented</a></li>
<li><a href="Interface_description_language" title="Interface description language">Interface description</a></li>
<li><a href="Language-oriented_programming" title="Language-oriented programming">Language-oriented</a></li>
<li><a href="List_comprehension" title="List comprehension">List comprehension</a></li>
<li><a href="Low-code_development_platform" title="Low-code development platform">Low-code</a></li>
<li><a href="Modeling_language" title="Modeling language">Modeling</a></li>
<li><a href="Natural-language_programming" class="mw-redirect" title="Natural-language programming">Natural language</a></li>
<li><a href="Non-English-based_programming_languages" title="Non-English-based programming languages">Non-English-based</a></li>
<li><a href="Page_description_language" title="Page description language">Page description</a></li>
<li><a href="Pipeline_(software)" title="Pipeline (software)">Pipes</a> and <a href="Filter_(software)" title="Filter (software)">filters</a></li>
<li><a href="Probabilistic_programming" title="Probabilistic programming">Probabilistic</a></li>
<li><a href="Quantum_programming" title="Quantum programming">Quantum</a></li>
<li><a href="Scientific_programming_language" title="Scientific programming language">Scientific</a></li>
<li><a href="Scripting_language" title="Scripting language">Scripting</a></li>
<li><a href="Set_theoretic_programming" title="Set theoretic programming">Set-theoretic</a></li>
<li><a href="Simulation_language" title="Simulation language">Simulation</a></li>
<li><a href="Stack-oriented_programming" title="Stack-oriented programming">Stack-based</a></li>
<li><a href="System_programming_language" title="System programming language">System</a></li>
<li><a href="Tactile_programming_language" title="Tactile programming language">Tactile</a></li>
<li><a href="Template_processor" title="Template processor">Templating</a></li>
<li><a href="Transformation_language" title="Transformation language">Transformation</a> (<a href="Graph_rewriting" title="Graph rewriting">Graph rewriting</a>, <a href="Production_system_(computer_science)" title="Production system (computer science)">Production</a>, <a href="Pattern_matching" title="Pattern matching">Pattern</a>)</li>
<li><a href="Visual_programming_language" title="Visual programming language">Visual</a></li></ul>
</div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Concurrent_computing" title="Concurrent computing">Concurrent</a>,<br><a href="Distributed_computing" title="Distributed computing">distributed</a>,<br><a href="Parallel_computing" title="Parallel computing">parallel</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Actor_model" title="Actor model">Actor-based</a></li>
<li><a href="Automatic_mutual_exclusion" title="Automatic mutual exclusion">Automatic mutual exclusion</a></li>
<li><a href="Choreographic_programming" title="Choreographic programming">Choreographic programming</a></li>
<li><a href="Concurrent_logic_programming" title="Concurrent logic programming">Concurrent logic</a> (<a href="Concurrent_constraint_logic_programming" title="Concurrent constraint logic programming">Concurrent constraint logic</a>)</li>
<li><a href="Concurrent_object-oriented_programming" title="Concurrent object-oriented programming">Concurrent OO</a></li>
<li><a href="Macroprogramming" title="Macroprogramming">Macroprogramming</a></li>
<li><a href="Multitier_programming" title="Multitier programming">Multitier programming</a></li>
<li><a href="Organic_computing" title="Organic computing">Organic computing</a></li>
<li><a href="Parallel_programming_model" title="Parallel programming model">Parallel programming models</a></li>
<li><a href="Partitioned_global_address_space" title="Partitioned global address space">Partitioned global address space</a></li>
<li><a href="Process-oriented_programming" title="Process-oriented programming">Process-oriented</a></li>
<li><a href="Relativistic_programming" title="Relativistic programming">Relativistic programming</a></li>
<li><a href="Service-oriented_programming" title="Service-oriented programming">Service-oriented</a></li>
<li><a href="Structured_concurrency" title="Structured concurrency">Structured concurrency</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Metaprogramming" title="Metaprogramming">Metaprogramming</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Attribute-oriented_programming" title="Attribute-oriented programming">Attribute-oriented</a></li>
<li><a href="Automatic_programming" title="Automatic programming">Automatic</a> (<a href="Inductive_programming" title="Inductive programming">Inductive</a>)</li>
<li><a href="Dynamic_programming_language" title="Dynamic programming language">Dynamic</a></li>
<li><a href="Extensible_programming" title="Extensible programming">Extensible</a></li>
<li><a href="Generic_programming" title="Generic programming">Generic</a></li>
<li><a href="Homoiconicity" title="Homoiconicity">Homoiconicity</a></li>
<li><a href="Interactive_programming" title="Interactive programming">Interactive</a></li>
<li><a href="Macro_(computer_science)" title="Macro (computer science)">Macro</a> (<a href="Hygienic_macro" title="Hygienic macro">Hygienic</a>)</li>
<li><a href="Metalinguistic_abstraction" title="Metalinguistic abstraction">Metalinguistic abstraction</a></li>
<li><a href="Multi-stage_programming" title="Multi-stage programming">Multi-stage</a></li>
<li><a href="Program_synthesis" title="Program synthesis">Program synthesis</a> (<a href="Bayesian_program_synthesis" title="Bayesian program synthesis">Bayesian</a>, <a href="Inferential_programming" title="Inferential programming">Inferential</a>, <a href="Programming_by_demonstration" title="Programming by demonstration">by demonstration</a>, <a href="Programming_by_example" title="Programming by example">by example</a>)</li>
<li><a href="Reflective_programming" title="Reflective programming">Reflective</a></li>
<li><a href="Self-modifying_code" title="Self-modifying code">Self-modifying code</a></li>
<li><a href="Symbolic_programming" title="Symbolic programming">Symbolic</a></li>
<li><a href="Template_metaprogramming" title="Template metaprogramming">Template</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Separation_of_concerns" title="Separation of concerns">Separation<br>of concerns</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Aspect-oriented_programming" title="Aspect-oriented programming">Aspects</a></li>
<li><a href="Component-based_software_engineering" title="Component-based software engineering">Components</a></li>
<li><a href="Data-driven_programming" title="Data-driven programming">Data-driven</a></li>
<li><a href="Data-oriented_design" title="Data-oriented design">Data-oriented</a></li>
<li><a href="Event-driven_programming" title="Event-driven programming">Event-driven</a></li>
<li><a href="Feature-oriented_programming" title="Feature-oriented programming">Features</a></li>
<li><a href="Literate_programming" title="Literate programming">Literate</a></li>
<li><a href="Role-oriented_programming" title="Role-oriented programming">Roles</a></li>
<li><a href="Subject-oriented_programming" title="Subject-oriented programming">Subjects</a></li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1038841319">
/* start https://en.wikipedia.org/ */
.mw-parser-output .tooltip-dotted{border-bottom:1px dotted;cursor:help}
/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox authority-control" aria-labelledby="Authority_control_databases_frameless&#124;text-top&#124;10px&#124;alt=Edit_this_at_Wikidata&#124;link=https&#58;//www.wikidata.org/wiki/Q223335#identifiers&#124;class=noprint&#124;Edit_this_at_Wikidata1260" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Authority_control_databases_frameless&#124;text-top&#124;10px&#124;alt=Edit_this_at_Wikidata&#124;link=https&#58;//www.wikidata.org/wiki/Q223335#identifiers&#124;class=noprint&#124;Edit_this_at_Wikidata1260" style="font-size:114%;margin:0 4em">Authority control databases </div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">National</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://d-nb.info/gnd/4058133-0">Germany</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://id.loc.gov/authorities/sh85129214">United States</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://catalogue.bnf.fr/ark:/12148/cb11966709k">France</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://data.bnf.fr/ark:/12148/cb11966709k">BnF data</a></span></li><li><span class="uid"><span class="rt-commentedText tooltip tooltip-dotted" title="strukturované programování"><a rel="nofollow" class="external text" href="https://aleph.nkp.cz/F/?func=find-c&local_base=aut&ccl_term=ica=ph126154&CON_LNG=ENG">Czech Republic</a></span></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://datos.bne.es/resource/XX531013">Spain</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://www.nli.org.il/en/authorities/987007541329205171">Israel</a></span></li></ul></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://lux.collections.yale.edu/view/concept/36bf4bab-18e5-48b4-b4dd-8755dac26b86">Yale LUX</a></span></li></ul></div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-03-07" href="https://en.wikipedia.org/wiki/?title=Structured_programming&oldid=1279288445">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>